package com.ysl.demo;

import com.ysl.bean.Condition;
import com.ysl.bean.PageBean;
import com.ysl.bean.UserDemo;
import com.ysl.service.UserServiceImpl;

import java.util.List;

public class Test {
    public static void main(String[] args) throws Exception {
        UserServiceImpl userService = new UserServiceImpl();
        PageBean users = userService.findUsers(new Condition(), 3);
        List<UserDemo> userDemos = users.getUserDemos();
        userDemos.forEach(System.out::println);
        System.out.println("PageSize = " + users.getPageSize());
        System.out.println("PageTotal = " + users.getPageTotal());
        System.out.println("PageCount = " + users.getPageCount());
        System.out.println("P = " + users.getP());
    }
}
